import Vue from 'vue'
import App from './App'
import uView from "uview-ui";

import TIM from 'tim-wx-sdk';
import TIMUploadPlugin from 'tim-upload-plugin';

import {URL,ajaxPost, getTokens, toDs, gTo, cTo, _toast, setHeight, getHeight, backT, _call, checkPhone, _confirm, isNull, _upLoadPic, _alert, replaceDetail, getSync, setSync, _upLoadVideo, removeSync, getParam, inputBlur,screenshot,showLoading,closeLoading,browseFinish,throttle,noMultipleClicks, sTo, _pay, _getLocation, testIdCard, _previewImage } from "./static/js/common";

import privacyAuthModel from './components/privacyAuthModel/privacyAuthModel.vue'//全局组件--隐私协议弹窗
Vue.component('privacyAuthModel',privacyAuthModel)

Vue.use(uView);
Vue.use(TIM);


let options = {
    SDKAppID: 1600017866 // 接入时需要将 0 替换为您的云通信应用的 SDKAppID
};
let tim = TIM.create(options); // SDK 实例通常用 tim 表示
tim.setLogLevel(0);
tim.registerPlugin({
    'tim-upload-plugin': TIMUploadPlugin
});

// import QQMapWX from '@/static/js/qqmap-wx-jssdk.min.js'
// Vue.prototype.$qqmapsdk = new QQMapWX({
// 	key: ''
// });

Vue.config.productionTip = false


App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()

Vue.prototype.$TIM = TIM;
Vue.prototype.$tim = tim;
Vue.prototype.$url = URL;
Vue.prototype.$ajax = ajaxPost;
Vue.prototype.$getTokens = getTokens;
Vue.prototype.$toDs = toDs;
Vue.prototype.$gTo = gTo;
Vue.prototype.$cTo = cTo;
Vue.prototype.$toast = _toast;
Vue.prototype.$setHeight = setHeight;
Vue.prototype.$getHeight = getHeight;
Vue.prototype.$backT = backT;
Vue.prototype.$call = _call;
Vue.prototype.$checkPhone = checkPhone;
Vue.prototype.$confirm = _confirm;
Vue.prototype.$isNull = isNull;
Vue.prototype.$upLoadPic = _upLoadPic;
Vue.prototype.$alert = _alert;
Vue.prototype.$replaceDetail = replaceDetail;
Vue.prototype.$getSync = getSync;
Vue.prototype.$setSync = setSync;
Vue.prototype.$upLoadVideo = _upLoadVideo;
Vue.prototype.$removeSync = removeSync;
Vue.prototype.$getParam = getParam;
Vue.prototype.$inputBlur = inputBlur;
Vue.prototype.$screenshot = screenshot;
Vue.prototype.$showLoading = showLoading;
Vue.prototype.$closeLoading = closeLoading;
Vue.prototype.$browseFinish = browseFinish;
Vue.prototype.$throttle = throttle;
Vue.prototype.$noMultipleClicks = noMultipleClicks;
Vue.prototype.$sTo = sTo;
Vue.prototype.$pay = _pay;
Vue.prototype.$getLocation = _getLocation;
Vue.prototype.$testIdCard = testIdCard;
Vue.prototype.$previewImage = _previewImage;





